﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Mathmall.Administration.Migrations
{
    /// <inheritdoc />
    public partial class AllTablesUsenvarchar : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "SpuName",
                table: "SpuInfo",
                type: "nvarchar(200)",
                nullable: true,
                comment: "商品名称",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldNullable: true,
                oldComment: "商品名称");

            migrationBuilder.AlterColumn<string>(
                name: "SpuDescription",
                table: "SpuInfo",
                type: "nvarchar(1000)",
                nullable: true,
                comment: "商品描述",
                oldClrType: typeof(string),
                oldType: "varchar(1000)",
                oldNullable: true,
                oldComment: "商品描述");

            migrationBuilder.AlterColumn<string>(
                name: "ImageName",
                table: "SpuImage",
                type: "nvarchar(200)",
                nullable: true,
                comment: "图片名",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldNullable: true,
                oldComment: "图片名");

            migrationBuilder.AlterColumn<string>(
                name: "SpuName",
                table: "SpuComment",
                type: "nvarchar(255)",
                nullable: true,
                comment: "商品名字",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "商品名字");

            migrationBuilder.AlterColumn<string>(
                name: "SpuAttrbutes",
                table: "SpuComment",
                type: "nvarchar(64)",
                nullable: true,
                comment: "购买时属性组合",
                oldClrType: typeof(string),
                oldType: "varchar(64)",
                oldNullable: true,
                oldComment: "会员ip");

            migrationBuilder.AlterColumn<string>(
                name: "MemberNickName",
                table: "SpuComment",
                type: "nvarchar(255)",
                nullable: true,
                comment: "会员昵称",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "会员昵称");

            migrationBuilder.AlterColumn<string>(
                name: "AttrValue",
                table: "SkuSaleAttrValue",
                type: "nvarchar(200)",
                nullable: true,
                comment: "销售属性值",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldNullable: true,
                oldComment: "销售属性值");

            migrationBuilder.AlterColumn<string>(
                name: "AttrName",
                table: "SkuSaleAttrValue",
                type: "nvarchar(200)",
                nullable: true,
                comment: "销售属性名",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldNullable: true,
                oldComment: "销售属性名");

            migrationBuilder.AlterColumn<string>(
                name: "SkuTitle",
                table: "SkuInfo",
                type: "nvarchar(255)",
                nullable: true,
                comment: "标题",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "标题");

            migrationBuilder.AlterColumn<string>(
                name: "SkuSubtitle",
                table: "SkuInfo",
                type: "nvarchar(2000)",
                nullable: true,
                comment: "副标题",
                oldClrType: typeof(string),
                oldType: "varchar(2000)",
                oldNullable: true,
                oldComment: "副标题");

            migrationBuilder.AlterColumn<string>(
                name: "SkuName",
                table: "SkuInfo",
                type: "nvarchar(255)",
                nullable: true,
                comment: "Sku名称",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "Sku名称");

            migrationBuilder.AlterColumn<string>(
                name: "SkuDescription",
                table: "SkuInfo",
                type: "nvarchar(2000)",
                nullable: true,
                comment: "sku介绍描述",
                oldClrType: typeof(string),
                oldType: "varchar(2000)",
                oldNullable: true,
                oldComment: "sku介绍描述");

            migrationBuilder.AlterColumn<string>(
                name: "AttrValue",
                table: "ProductAttrValue",
                type: "nvarchar(200)",
                nullable: true,
                comment: "属性值",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldNullable: true,
                oldComment: "属性值");

            migrationBuilder.AlterColumn<string>(
                name: "AttrName",
                table: "ProductAttrValue",
                type: "nvarchar(200)",
                nullable: true,
                comment: "属性名",
                oldClrType: typeof(string),
                oldType: "varchar(200)",
                oldNullable: true,
                oldComment: "属性名");

            migrationBuilder.AlterColumn<string>(
                name: "CategoryName",
                table: "CategoryBrandRelation",
                type: "nvarchar(255)",
                nullable: true,
                comment: "分类名称",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "分类名称");

            migrationBuilder.AlterColumn<string>(
                name: "BrandName",
                table: "CategoryBrandRelation",
                type: "nvarchar(255)",
                nullable: true,
                comment: "品牌名称",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "品牌名称");

            migrationBuilder.AlterColumn<string>(
                name: "Description",
                table: "AttrGroup",
                type: "nvarchar(255)",
                nullable: true,
                comment: "描述",
                oldClrType: typeof(string),
                oldType: "varchar(255)",
                oldNullable: true,
                oldComment: "描述");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "SpuName",
                table: "SpuInfo",
                type: "varchar(200)",
                nullable: true,
                comment: "商品名称",
                oldClrType: typeof(string),
                oldType: "nvarchar(200)",
                oldNullable: true,
                oldComment: "商品名称");

            migrationBuilder.AlterColumn<string>(
                name: "SpuDescription",
                table: "SpuInfo",
                type: "varchar(1000)",
                nullable: true,
                comment: "商品描述",
                oldClrType: typeof(string),
                oldType: "nvarchar(1000)",
                oldNullable: true,
                oldComment: "商品描述");

            migrationBuilder.AlterColumn<string>(
                name: "ImageName",
                table: "SpuImage",
                type: "varchar(200)",
                nullable: true,
                comment: "图片名",
                oldClrType: typeof(string),
                oldType: "nvarchar(200)",
                oldNullable: true,
                oldComment: "图片名");

            migrationBuilder.AlterColumn<string>(
                name: "SpuName",
                table: "SpuComment",
                type: "varchar(255)",
                nullable: true,
                comment: "商品名字",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "商品名字");

            migrationBuilder.AlterColumn<string>(
                name: "SpuAttrbutes",
                table: "SpuComment",
                type: "varchar(64)",
                nullable: true,
                comment: "会员ip",
                oldClrType: typeof(string),
                oldType: "nvarchar(64)",
                oldNullable: true,
                oldComment: "购买时属性组合");

            migrationBuilder.AlterColumn<string>(
                name: "MemberNickName",
                table: "SpuComment",
                type: "varchar(255)",
                nullable: true,
                comment: "会员昵称",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "会员昵称");

            migrationBuilder.AlterColumn<string>(
                name: "AttrValue",
                table: "SkuSaleAttrValue",
                type: "varchar(200)",
                nullable: true,
                comment: "销售属性值",
                oldClrType: typeof(string),
                oldType: "nvarchar(200)",
                oldNullable: true,
                oldComment: "销售属性值");

            migrationBuilder.AlterColumn<string>(
                name: "AttrName",
                table: "SkuSaleAttrValue",
                type: "varchar(200)",
                nullable: true,
                comment: "销售属性名",
                oldClrType: typeof(string),
                oldType: "nvarchar(200)",
                oldNullable: true,
                oldComment: "销售属性名");

            migrationBuilder.AlterColumn<string>(
                name: "SkuTitle",
                table: "SkuInfo",
                type: "varchar(255)",
                nullable: true,
                comment: "标题",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "标题");

            migrationBuilder.AlterColumn<string>(
                name: "SkuSubtitle",
                table: "SkuInfo",
                type: "varchar(2000)",
                nullable: true,
                comment: "副标题",
                oldClrType: typeof(string),
                oldType: "nvarchar(2000)",
                oldNullable: true,
                oldComment: "副标题");

            migrationBuilder.AlterColumn<string>(
                name: "SkuName",
                table: "SkuInfo",
                type: "varchar(255)",
                nullable: true,
                comment: "Sku名称",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "Sku名称");

            migrationBuilder.AlterColumn<string>(
                name: "SkuDescription",
                table: "SkuInfo",
                type: "varchar(2000)",
                nullable: true,
                comment: "sku介绍描述",
                oldClrType: typeof(string),
                oldType: "nvarchar(2000)",
                oldNullable: true,
                oldComment: "sku介绍描述");

            migrationBuilder.AlterColumn<string>(
                name: "AttrValue",
                table: "ProductAttrValue",
                type: "varchar(200)",
                nullable: true,
                comment: "属性值",
                oldClrType: typeof(string),
                oldType: "nvarchar(200)",
                oldNullable: true,
                oldComment: "属性值");

            migrationBuilder.AlterColumn<string>(
                name: "AttrName",
                table: "ProductAttrValue",
                type: "varchar(200)",
                nullable: true,
                comment: "属性名",
                oldClrType: typeof(string),
                oldType: "nvarchar(200)",
                oldNullable: true,
                oldComment: "属性名");

            migrationBuilder.AlterColumn<string>(
                name: "CategoryName",
                table: "CategoryBrandRelation",
                type: "varchar(255)",
                nullable: true,
                comment: "分类名称",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "分类名称");

            migrationBuilder.AlterColumn<string>(
                name: "BrandName",
                table: "CategoryBrandRelation",
                type: "varchar(255)",
                nullable: true,
                comment: "品牌名称",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "品牌名称");

            migrationBuilder.AlterColumn<string>(
                name: "Description",
                table: "AttrGroup",
                type: "varchar(255)",
                nullable: true,
                comment: "描述",
                oldClrType: typeof(string),
                oldType: "nvarchar(255)",
                oldNullable: true,
                oldComment: "描述");
        }
    }
}
